<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE NoImplicitPrelude #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-- ----------------------------------------------------------------------------</span><span>
</span><span id="line-5"></span><span class="hs-comment">--</span><span>
</span><span id="line-6"></span><span class="hs-comment">--  (c) The University of Glasgow 2006</span><span>
</span><span id="line-7"></span><span class="hs-comment">--</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Fingerprints for recompilation checking and ABI versioning, and</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- implementing fast comparison of Typeable.</span><span>
</span><span id="line-10"></span><span class="hs-comment">--</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- ----------------------------------------------------------------------------</span><span>
</span><span id="line-12"></span><span>
</span><span id="line-13"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Fingerprint.Type</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier">Fingerprint</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-14"></span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.List.html"><span class="hs-identifier">GHC.List</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.List.html#length"><span class="hs-identifier">length</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#replicate"><span class="hs-identifier">replicate</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.html"><span class="hs-identifier">GHC.Num</span></a></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Show.html"><span class="hs-identifier">GHC.Show</span></a></span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Word.html"><span class="hs-identifier">GHC.Word</span></a></span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Numeric.html"><span class="hs-identifier">Numeric</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Numeric.html#showHex"><span class="hs-identifier">showHex</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span class="hs-comment">-- Using 128-bit MD5 fingerprints for now.</span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span class="hs-keyword">data</span><span> </span><span id="Fingerprint"><span class="annot"><a href="GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-var">Fingerprint</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Fingerprint"><span class="annot"><a href="GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-var">Fingerprint</span></a></span></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span>
</span><span id="line-25"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span> </span><span id="local-6989586621679506892"><span id="local-6989586621679506897"><span class="annot"><span class="annottext">Fingerprint -&gt; Fingerprint -&gt; Bool
(Fingerprint -&gt; Fingerprint -&gt; Bool)
-&gt; (Fingerprint -&gt; Fingerprint -&gt; Bool) -&gt; Eq Fingerprint
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: Fingerprint -&gt; Fingerprint -&gt; Bool
$c/= :: Fingerprint -&gt; Fingerprint -&gt; Bool
== :: Fingerprint -&gt; Fingerprint -&gt; Bool
$c== :: Fingerprint -&gt; Fingerprint -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></a></span></span></span><span>  </span><span class="hs-comment">-- ^ @since 4.4.0.0</span><span>
</span><span id="line-26"></span><span>           </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679506867"><span id="local-6989586621679506869"><span id="local-6989586621679506872"><span id="local-6989586621679506875"><span id="local-6989586621679506878"><span id="local-6989586621679506882"><span id="local-6989586621679506887"><span class="annot"><span class="annottext">Eq Fingerprint
Eq Fingerprint
-&gt; (Fingerprint -&gt; Fingerprint -&gt; Ordering)
-&gt; (Fingerprint -&gt; Fingerprint -&gt; Bool)
-&gt; (Fingerprint -&gt; Fingerprint -&gt; Bool)
-&gt; (Fingerprint -&gt; Fingerprint -&gt; Bool)
-&gt; (Fingerprint -&gt; Fingerprint -&gt; Bool)
-&gt; (Fingerprint -&gt; Fingerprint -&gt; Fingerprint)
-&gt; (Fingerprint -&gt; Fingerprint -&gt; Fingerprint)
-&gt; Ord Fingerprint
Fingerprint -&gt; Fingerprint -&gt; Bool
Fingerprint -&gt; Fingerprint -&gt; Ordering
Fingerprint -&gt; Fingerprint -&gt; Fingerprint
forall a.
Eq a
-&gt; (a -&gt; a -&gt; Ordering)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; Ord a
min :: Fingerprint -&gt; Fingerprint -&gt; Fingerprint
$cmin :: Fingerprint -&gt; Fingerprint -&gt; Fingerprint
max :: Fingerprint -&gt; Fingerprint -&gt; Fingerprint
$cmax :: Fingerprint -&gt; Fingerprint -&gt; Fingerprint
&gt;= :: Fingerprint -&gt; Fingerprint -&gt; Bool
$c&gt;= :: Fingerprint -&gt; Fingerprint -&gt; Bool
&gt; :: Fingerprint -&gt; Fingerprint -&gt; Bool
$c&gt; :: Fingerprint -&gt; Fingerprint -&gt; Bool
&lt;= :: Fingerprint -&gt; Fingerprint -&gt; Bool
$c&lt;= :: Fingerprint -&gt; Fingerprint -&gt; Bool
&lt; :: Fingerprint -&gt; Fingerprint -&gt; Bool
$c&lt; :: Fingerprint -&gt; Fingerprint -&gt; Bool
compare :: Fingerprint -&gt; Fingerprint -&gt; Ordering
$ccompare :: Fingerprint -&gt; Fingerprint -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Ord</span></a></span></span></span></span></span></span></span></span><span> </span><span class="hs-comment">-- ^ @since 4.4.0.0</span><span>
</span><span id="line-27"></span><span>           </span><span class="hs-special">)</span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span class="hs-comment">-- | @since 4.7.0.0</span><span>
</span><span id="line-30"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679506861"><span id="local-6989586621679506864"><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-31"></span><span>  </span><span id="local-6989586621679506856"><span class="annot"><span class="annottext">show :: Fingerprint -&gt; String
</span><a href="GHC.Show.html#show"><span class="hs-identifier hs-var hs-var hs-var hs-var">show</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span> </span><span id="local-6989586621679506854"><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679506854"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679506853"><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679506853"><span class="hs-identifier hs-var">w2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; String
</span><a href="#local-6989586621679506852"><span class="hs-identifier hs-var">hex16</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679506854"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; String
</span><a href="#local-6989586621679506852"><span class="hs-identifier hs-var">hex16</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679506853"><span class="hs-identifier hs-var">w2</span></a></span><span>
</span><span id="line-32"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-33"></span><span>      </span><span class="hs-comment">-- | Formats a 64 bit number as 16 digits hex.</span><span>
</span><span id="line-34"></span><span>      </span><span class="annot"><a href="#local-6989586621679506852"><span class="hs-identifier hs-type">hex16</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-35"></span><span>      </span><span id="local-6989586621679506852"><span class="annot"><span class="annottext">hex16 :: Word64 -&gt; String
</span><a href="#local-6989586621679506852"><span class="hs-identifier hs-var hs-var">hex16</span></a></span></span><span> </span><span id="local-6989586621679506851"><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679506851"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679506846"><span class="annot"><span class="annottext">hex :: String
</span><a href="#local-6989586621679506846"><span class="hs-identifier hs-var hs-var">hex</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; ShowS
forall a. (Integral a, Show a) =&gt; a -&gt; ShowS
</span><a href="Numeric.html#showHex"><span class="hs-identifier hs-var">showHex</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679506851"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-36"></span><span>                 </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char -&gt; String
forall a. Int -&gt; a -&gt; [a]
</span><a href="GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">16</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Int
forall a. [a] -&gt; Int
</span><a href="GHC.List.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679506846"><span class="hs-identifier hs-var">hex</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679506846"><span class="hs-identifier hs-var">hex</span></a></span><span>
</span><span id="line-37"></span></pre></body></html>